<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"
    errorPage=""
    %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>新增系統設定</title>
    <script language="JavaScript">
  function formCheck()
  {
     if(document.myForm.name.value == ""){
	      alert("請輸入設定名稱");
		  document.myForm.id.focus()
		  return false;
	 }
	 if(document.myForm.value.value == ""){
	      alert("請輸入設定值");
		  document.myForm.pw1.focus()
		  return false;
	 }	 
	
  }
</script>
    </head>
  <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
 
<% if(session.getAttribute("access") == "y" ){%>
 <table width="750" border="0" align="center">
  <tr>
    <td width="30" rowspan="4"><jsp:include page="../frameset/left.jsp" flush="true" ></jsp:include></td>
    <td colspan="2"><jsp:include page="../frameset/top.jsp" flush="true" ></jsp:include></td>
    <td width="40" rowspan="4"><jsp:include page="../frameset/right.jsp" flush="true" ></jsp:include></td>
  </tr>
  <tr>
    <td rowspan="2"><jsp:include page="../frameset/mean.jsp" flush="true" ></jsp:include>

    </td>
    <td height="32"><jsp:include page="../frameset/setting_mean.jsp" flush="true" ></jsp:include></td>
  </tr>
  <tr>
    <td>
    <table width="500" cellspacing="0" cellpadding="0"> 
 <tr>
    <td align="center" valign="top" bordercolor="1">
      <div align="center">  
        <table width="100%"  border="0" cellspacing="1" cellpadding="1">
          <tr>
            <td align="center" valign="top" bordercolor="#00CCFF"><div align="center">
            <form name="myForm" method="post" action="do_addsetting.jsp">    <%//送出表單 %>
              <table width="100%"  border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#999999">
                <tr>
                  <td width="23%"><div align="right"><span class="gytext11"><font class=cherry></font>設定名稱：</span></div></td>
                  <td width="77%"><div align="left"><span class="lggytext11">
                      <input type=text maxlength=50 value="" name="name">
                      請用英文命名
                     </span></div></td>
                </tr>
                
                <tr bgcolor="#FFFFCC">
                  <td><div align="right"><span class="gytext11"><font class=cherry></font>設定值：</span></div></td>
                  <td><div align="left"><span class="lggytext11">
                       <textarea name="value" rows="2" cols="45"></textarea>
                  </span></div></td>
                </tr>
               <tr>
                  <td><div align="right"><span class="gytext11"><font class=cherry></font>系統設定<br>之說明：</span></div></td>
                  <td><div align="left"><span class="lggytext11">
                     <textarea name="desc" rows="2" cols="45"></textarea>
                  </span></div></td>
                </tr>
                <tr bgcolor="#FFFFCC">
                  <td colspan="2"><div align="right">
                      <input type="hidden" name="textfield"/>
                      <input name="Submit" type="submit"  onClick="return formCheck()" value="新增" /> 
                  </div></td>
                </tr>
              </table>
            
                </form>
              </div>            </td>
          </tr>
        </table>  
</div>      </td>
</table>
    </td>
  </tr>
  <tr>
    <td colspan="2"></td>
  </tr>
</table> 
<%
  }
  else{
  	response.sendRedirect("../index.jsp"); //若沒有登入則回到index.jsp
  } 
  %>  
</body>
</html>